// helper class & functional class
.center{
    display: flex;
    justify-content: center;
}

// style for main framework
body{
    background-color: #f5f5f5;
}

.pure-g [class*=pure-u]{
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji" !important;
    font-weight: normal;
    font-size: 16px;
    line-height: 24px;
    color: rgb(33, 37, 41);

    code {
        font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, "Microsoft YaHei", monospace;
    }

    :not(pre) > code {
        font-size: 14px;
        background-color: #e3e6e8;
        padding: 2px 4px;
        border-radius: 3px;
    }

    .highlight {
        padding: 0;
        width: 100%;
        font-size: 13px;
        margin-bottom: 16px;
        overflow-x: auto;

        pre {
            margin: 0;
            padding: 0;
        }
    }

    blockquote {
        position: relative;
        overflow: hidden;
        margin: 0 16px 16px 16px;
        padding: 16px 0 0 16px;
        color: #525960;

        &::before {
            content: "";
            display: block;
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            width: 4px;
            border-radius: 2px;
            background: #c8ccd0;
        }

        mark { // fix color for mark inside blockquote
            color: inherit;
        }
    }

    overflow-wrap: break-word;

    summary {
        margin-bottom: 4px;
    }

    details {
        margin-bottom: 16px;
    }
}


.page{
    max-width: 1150px;
    margin: auto;
    background-color: white;
}

.container{
    max-width: 960px;
    margin: auto;
}

.moment-content{
    position: relative;

    .top-mark {
        position: absolute;
        right: 0%;
    }
}

.moment-row{
    margin-bottom: 20px;
}

@media (min-width:1150px) {
    .page{
        margin-top: 50px;
    }
}

@media (max-width: 720px) {
    .moment-row{
        margin-bottom: 20px;
    }

    .container{
        padding-left: 20px;
        padding-right: 20px;
    }
}

p{
    margin-top: 0;
}

/* START - top cover part */
.jumbotron{
    padding-top: 64px;
    background-position: top;
    background-size: cover; 
    min-height: 200px; 
    text-align: center;
    margin-bottom: 30px;

    .site-title{
        color: rgb(208, 217, 225);
        font-size: 56px;
        font-weight: 300;
        margin-bottom: 20px;
    }
    
    .signature{
        color: rgba(254, 254, 254, 0.6);
        font-size: 20px;
        font-weight: 300;
    }
}
/* END - top cover part */

/* START - pagination */
// todo replace this part
$dark-blue: #21365c;
$blue: #3A6bA5;
$gray: #919EB1;

.pagination{
    display: flex;
    margin-top: 20px;
    margin-bottom: 30px;

    .page-item{
        padding-left: 15px;
        padding-right: 15px;
        padding-top: 10px;
        padding-bottom: 10px;
    
        &.active{
            background-color: $blue;
            color: #ffffff;
        }
        
        &.disabled{
            color: $gray;
        }
    }
    
    a{
        color: $dark-blue;
        text-decoration: none;
    }

    .page-link .page-item:hover{
        background-color: #f5f5f5;
    }
}
/* END - pagination */


/* START - time */
.time{
    text-align: right;
    padding-right: 80px;
    /* white-space: nowrap; */
    font-weight: 300;
    margin-bottom: 20px;

    .month-day{
        font-size: 24px;
        margin-bottom: 10px;
    }

    .year{
        font-size: 16px;
    }
}
@media (max-width: 576px){
    .time{
        text-align: center;
        padding-right: 15px;
    }
}
@media (max-width: 720px) and (min-width:576px){
    .time{
        padding-right: 40px;
    }
}
/* END - time */


/* START - user name, avatar & tags */
.user-info{
    display: flex;

    .avatar{
        max-height: 45px;
        float: left;
        margin-right: 5px;
    }

    .intro{
        float: left;
        padding-left: 5px;

        .name{
            color:#186D9C!important;
            margin-bottom: 0;
            line-height: 1.1;
            font-size: 24px;
        }

        div:nth-child(2) {
            word-break: break-all;
            line-height: 18px;
        }

        .moment-signature{
            font-size: 80%;
            color: #6c757d!important;
            white-space: nowrap;
        }
    }

    margin-bottom: 24px;
}
/* END - user name, avatar & tags */


/* START - for the main content */
.context{
    clear: left;
    margin-bottom: 10px;

    a {
        text-decoration: none;
        color: #0059b3;
        &:visited {
            color: #0059b3;
        }
        &::after {
            padding-left: 3px;

            font-family: "Font Awesome 5 Free"; 
            content: "\f35d";
            font-weight: 900; 
            display: inline-block;
            font-style: normal;
            font-variant: normal;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
        }
    }

    // ordered & unordered list style

    ol li {
        padding-left: 5px;

        &::marker {
            color: #919EB1;
        }
    }

    ul li {
        padding-left: 5px;

        &::marker {
            color: #919EB1;
        }
    }
}

.tag-div {
    display: -webkit-flex;
    display: flex;   
    flex-direction: row;
    flex-wrap: wrap;

    margin-bottom: 10px;
    .new-tag {
        line-height: 30px;
        padding-left: 20px;
        padding-right: 15px;
        margin-right: 10px;
        margin-bottom: 5px;
        
		border-radius: 15px;

        background-color: #EDEDED;
        color: #132939;

        text-indent: -10px;
        font-size: 90%;
        white-space: nowrap;

        &::before{
            content:"#";
            text-align: center;

            background-color: #8EA1B0;
            color: #ffffff;

            padding-top: 1px;
            padding-bottom: 1px;
            padding-left: 6px;
            padding-right: 6px;
		    border-radius: 12px;

            margin-right: 6px;

            font-size: 110%;
        }
    }
}

.single-pic{
    max-width: 65%; 
    max-height: 250px;
    padding-bottom:10px;
    margin-top: 5px; 

    &:hover {
        cursor: pointer;
    }
}

// pic set
.pic-grid{
    max-width: 80%;

    .img-container{
        padding-top: 50%;
        padding-bottom: 50%;
        position: relative;
        height: 0px;
        
        &.img-black-filter::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;

            background-color: rgb(0, 0, 0);
            opacity: 0.8;
        }

        .more-icon {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;

            background-size: 100% 100%;
            z-index: 1;
        }
    }

    img{
        object-fit: cover;
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0
    }

    .add-padding{
        padding: 2.5px;
    }

    &:hover {
        cursor: pointer;
    }
}

/* for links */
.share-link-block{
    max-width: 420px;
    margin: auto;

    padding-bottom:10px; 
    padding-top:10px; 
    margin-bottom:10px;
    background: #f7f7f7;

    .link-table{
        margin-left: 10%;
        max-width: 80%;
    }

    .link-logo{
        max-width: 50px;
        max-height: 50px;
    }

    a{
        color:#17a2b8;
        word-wrap: break-word;
        text-decoration: none;
    }
}

.bilibili-video {
    position: relative;
    max-width: 85%;
    height: 0;
    padding-bottom: 45%;
    margin-bottom: 10px;

    iframe {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
    }
}

// for the note info
.moment-note{
    display: flex;
    margin-bottom: 10px;
    justify-content: space-between;
    color:#808080;

    .note{
        font-size: 80%;
        color: rgba(0, 0, 0, 0.5);
    
        margin-top: 0;
        margin-bottom: 0;


        .note-time {
            padding-right: 15px;
        }
    }
}

// note at the bottom of each row
.moment-note {
    .like-btn {
        &:hover {
            cursor: pointer;
        }
    }

    .comment-btn {
        padding-right: 10px;

        &:hover {
            cursor: pointer;
        }
    }
}

// hr 
hr {
    margin-top: 20px;
    border-width: 0;
    border-top: 1px solid;
    border-color: rgba(0, 0, 0, 0.1);
    clear: both
}
/* END - for the main content */


/* START - footer*/
.footer {
    padding-top: 20px;
    padding-bottom: 30px;
    background-color: #f5f5f5;
    
    color: #6c757d !important;
    text-align: center;
    font-size: 95%;

    a{ 
        text-decoration: underline !important; 
        color:#6c757d !important;
    } 
}
/* END - footer*/


/* back-to-top button */
#back-top-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px; 
    z-index: 99;

    border: none;
    outline: none;

    background-color: #d1d1d1; /* Set a background color */
    color: #3a6ba5; /* Text color */

    opacity: 0.85;

    cursor: pointer; /* Add a mouse pointer on hover */

    padding: 12px;
    border-radius: 10px; 
    font-size: 20px;
}
  
